<?xml version="1.0" encoding="UTF-8" ?>
<!--
File Name : attendDetail.jsp
CREATE DT : 2009/11/03
-->
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<html xmlns="http://www.w3.org/1999/xhtml">
<!-- ============================== BODY START ==============================-->
<head>
<s:head theme="ajax" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />

<title>근태관리확인-관리자</title>

<!-- ============================== J A V A S C R I P T		S T  A R T ============================== -->

<script type="text/javascript">

	/*********************************************CALENDER******************************************************/
	/////////////////////달력////////////////////////////////////////////////
	function doOnLoad()
	{
		// 달력
		cal1 = new dhtmlxCalendarObject('s_date', false, {isYearEditable: true , isMonthEditable: true});
		cal1.setYearsRange(2000, 2050);
		cal1.setPosition(20,-82);
		cal1.draw();
		cal1.setOnClickHandler(selectDate1);

		cal2 = new dhtmlxCalendarObject('e_date', false, {isYearEditable: true , isMonthEditable: true});
		cal2.setYearsRange(2000, 2050);
		cal2.setPosition(20,-82);
		cal2.draw();
		// cal2.setOnClickHandler(selectDate2);

		document.getElementById('s_date').onfocus = function() { if (cal2.isVisible()) cal2.hide(); }
		document.getElementById('s_date').onfocus = function() { if (cal1.isVisible()) cal1.hide(); }

		document.body.onclick = function(){calendarHide("cal1,cal2","D");};
	}

	function selectDate1(date)
	{
		document.getElementById('s_date').value = cal1.getFormatedDate(null,date);
		dateFrom = new Date(date);
		dateTo = null;
		cal2.setSensitive(dateFrom, dateTo);
		cal1.hide();
		return true;
	}

	function selectDate2(date)
	{
		document.getElementById('e_date').value = cal1.getFormatedDate(null,date);
		dateTo = new Date(date);
		dateFrom = null;
		cal1.setSensitive(dateFrom, dateTo);
		cal2.hide();
		return true;
	}
	/////////////////////달력////////////////////////////////////////////////

	/*********************************************CALENDER******************************************************/

		//체크한 값을 넘기기 위한 전역변수
		var index 	= 	0;
		var args	=	"";
		/*************************************************************************************************/
		//엑셀다운로드
		function fnc_excel() {
			
			var f = document.frm;
			
			f.action = "attendManegerExcel_2.action";		//att_struts.xml
			f.submit();
			
			return false;		//페이지 로딩을 없게 한다.
		}
		/*************************************************************************************************/
		
		/*************************************************************************************************/
		//조회버튼 클릭시 실행됨.
		function fnc_retrieve() {
			call_dojo();
			return false;
		}
		/*************************************************************************************************/
		
		/*************************************************************************************************/
		//ajax로 조회리스트 호출.
	    function call_dojo() {
	        dojo.event.topic.publish("ajax_list");
	        return false;
	    }
		/*************************************************************************************************/
	    
		/*************************************************************************************************/
	    /**
	    *그룹선택이 변경될 경우에 팀과 사원  list를 변경한다.
	    */
	    function selectChange(type) {
	    
	    	if (type == "group") {
	    		$("#sgroup").css({backgroundColor:'#3366FF', color:'#FFFFFF'});
	    		if($("#sgroup").val()=="ALL"){
	    			$("#sgroup").css({backgroundColor:'#ffffff',color:'#656464'});
		    		}
				dojo.event.topic.publish("show_team");	//팀
				
				dojo.event.topic.publish("show_emp");	//사원
	    	} else if (type == "team") {
	    		$("#steam").css({backgroundColor:'#3366FF', color:'#FFFFFF'});
	    		if($("#steam").val()=="ALL"){
	    			$("#steam").css({backgroundColor:'#ffffff', color:'#656464'});
		    		}
	    			dojo.event.topic.publish("show_emp");	//사원
	    	}
	    	  else if (type == "emp")  {
	    		$("#semp_no").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
	    		if($("#semp_no").val() == "ALL"){
                    $("#semp_no").css({backgroundColor:'#ffffff',color:'#656464'});
		    		}
					//dojo.event.topic.publish("show_emp");	//사원
                          
		    }
    

		return false;
		}
		/*************************************************************************************************/
		
		/*************************************************************************************************/
		//확인 버튼 클릭
		function fnc_ok(f) {
		
			var flag = false;	//체크유무
		
			var cnt = 0;		//갯수 초기화
			
			
			//체크박스가 없을 떄
			if(typeof document.frm2.s_chk == "undefined" ){
				alert("조회된 데이터가 없습니다.");
				return false;
			}
			
			var f2	=	document.frm2;
			

			//체크박스가 1개인 경우
			if(typeof f2.s_chk.length == "undefined" ){
 
				if (!f2.s_chk.checked) {
					alert("미입력은 체크가 자동 해제됩니다. <s:text name="alert.message.notCheck" />");//체크할 대이터가 없음.
					f2.s_chk.focus();
					return false;
				} else if ( f2.ori_in_out_detail.value != f2.in_out_detail.value 
						&&	//변경한 경우와 비고가 공백인지 확인함. 
						f2.etc_mgr.value.replace(/^\s\s*/, '').replace(/\s\s*$/, '').length == 0) {					
					alert("<s:text name="alert.message.confirm" />");	//확인자비고를 반드시 입력하시기 바랍니다.
					f2.etc_mgr.focus();
					return false;					
				}else{
					cnt = 1;
				}
								
			} else {
				//체크박스가 1개 이상이면
				flag = true;
				
				for (var i = 0 ; i < f2.s_chk.length ; i++) {
					if (f2.in_out_detail[i].value == "XX") {
						//alert("미입력이 입력된 행이 체크되어있습니다. \n\n 미입력 행을 제외하고 저장합니다.");
						f2.s_chk[i].checked = false;
					}
					
					//flag=true;
					if (f2.s_chk[i].checked) {
						//확인자 비고 미입력 확인 trim 적용
						if ( f2.ori_in_out_detail[i].value != f2.in_out_detail[i].value 
								&& 
								f2.etc_mgr[i].value.replace(/^\s\s*/, '').replace(/\s\s*$/, '').length == 0) {
							alert("<s:text name="alert.message.confirm" />");
							f2.etc_mgr[i].focus();
							return false;
						
						}else{
							cnt++;
						}		
					}
				}//for

			}
			
			if(cnt == 0){
				alert("<s:text name="alert.message.notCheck" />");
				return false;
			}

			if (confirm("<s:text name="alert.message.confirmCheck" />")) {
				var args = fnc_arrMetrix();
				
				f2.updateArgs.value = args;	//update 할 arguments 전달
				
				document.getElementById("ajaxFlag").value = "Y";
				
				dojo.event.topic.publish("ajaxDojo");

				return false;
			}
			
			return false;
		}
		/*************************************************************************************************/
		
		//체크된 값들만 모아 배열 메트릭스 구성
		
		function fnc_arrMetrix() {

			//1개일경우
			if (frm2.s_chk.length == undefined ) {
				if (frm2.s_chk.checked) {
					//초기화
					args = 	new Array();	//배열생성

					var arr = new Array();
					
					//pk
					arr.push(	frm2.yyyymmdd.value		);
					arr.push(	frm2.aemp_no.value		);
					arr.push(	frm2.in_out_tp.value		);
					//pk
					
					arr.push(	frm2.in_out_detail.value	);
					
					if (frm2.etc_mgr.length == 0) {
						frm2.etc_mgr.value = "";
					}
					arr.push(	frm2.etc_mgr.value		);
					
					args.push( arr );
				}
				
			} else {	//다수일 경우
				//초기화
				args = 	new Array();	//배열생성
				
				for (var i = 0 ; i < frm2.s_chk.length ; i++ ) {
					
					if ( frm2.s_chk[i].checked ) {

						var arr	=	new Array();
					
						//arr.push(	frm2.s_chk[i].value			);
	
						//pk
						arr.push(	frm2.yyyymmdd[i].value		);
						arr.push(	frm2.aemp_no[i].value		);
						arr.push(	frm2.in_out_tp[i].value		);
						//pk
						
						arr.push(	frm2.in_out_detail[i].value	);
						arr.push(	frm2.etc_mgr[i].value		);
						arr.push(	frm2.advantage[i].value		);
						
						args.push( arr );
	
					}	//if
					
				}	//for
			}

			return args;
		}	//fnc_arrMetrix end.........

		//입력자 비고
			function fnc_ok1(field) {
			
	           if (!fnc_check(field)) {
					
					return false;
				}
		     
			var flag = false;	//체크유무
		
			var cnt = 0;		//갯수 초기화
			
			
			//체크박스가 없을 떄
			if(typeof document.frm2.s_chk == "undefined" ){
				alert("조회된 데이터가 없습니다.");
				return false;
			}
			
			var f2	=	document.frm2;
			
			
			
			//적용 되게 .......
			//체크박스가 1개인 경우
			//체크박스가 1개인 경우
			if(typeof f2.s_chk.length == "undefined" ){
				
 
				if (!f2.s_chk.checked) {
					alert("미입력은 체크가 자동 해제됩니다. <s:text name="alert.message.notCheck" />");//체크할 대이터가 없음.
					f2.s_chk.focus();
					return false;
				} else if ( f2.ori_in_out_detail.value != f2.in_out_detail.value 
						&&	//변경한 경우와 비고가 공백인지 확인함. 
						f2.etc_mgr.value.replace(/^\s\s*/, '').replace(/\s\s*$/, '').length == 0) {					
					alert("<s:text name="alert.message.confirm" />");	//확인자비고를 반드시 입력하시기 바랍니다.
					f2.etc_mgr.focus();
					return false;					
				}else{
					cnt = 1;
				}
								
			} else {
				//체크박스가 1개 이상이면
				flag = true;
				
				for (var i = 0 ; i < f2.s_chk.length ; i++) {
					
					
							cnt++;
						
				}//for

			}
			
			
			if(cnt == 0){
				alert("<s:text name="alert.message.notCheck" />");
				return false;
			}
			

			if (confirm("<s:text name="alert.message.confirmCheck" />")) {
				 
				
				
				
				var args = fnc_arrMetrix1();
				
			
				f2.updateArgs.value = args;	 //update 할 arguments 전달
				
				
				
				document.getElementById("ajaxFlag").value = "Y";//태그에서 아이디 값지정폼에서 디아브아이디 
				
				dojo.event.topic.publish("ajaxDojo1");
				

				return false;
			}
			
			return false;
		}

			function fnc_arrMetrix1() {
				

				//1개일경우
				if (frm2.s_chk.length == undefined ) {
					if (frm2.s_chk.checked) {
						//초기화
						args = 	new Array();	//배열생성

						var arr = new Array();
						
						
						//pk
						arr.push(	frm2.yyyymmdd.value		);
						arr.push(	frm2.aemp_no.value		);
						arr.push(	frm2.in_out_tp.value		);
						//pk
						
						//arr.push(	frm2.in_out_detail.value	);
						
						if (frm2.etc_mgr.length == 0) {
							frm2.etc_mgr.value = "";
						}
						arr.push(	frm2.etc_mgr.value		);
						
						args.push( arr );
					}
					
				} else {	//다수일 경우
					//초기화
					
					args = 	new Array();	//배열생성
					
					
					for (var i = 0 ; i < frm2.s_chk.length ; i++ ) {
						
						
						
						if ( frm2.s_chk[i].checked ) {
							
							

							var arr	=	new Array();
							
						
							//arr.push(	frm2.s_chk[i].value			);
							
		
							//pk
							arr.push(	frm2.yyyymmdd[i].value		);
							arr.push(	frm2.aemp_no[i].value		);
							arr.push(	frm2.in_out_tp[i].value		);
							//pk
							
							//arr.push(	frm2.in_out_detail[i].value	);
						
							//arr.push(	frm2.etc_mgr[i].value		);
	                        arr.push(   frm2.etc_emp[i].value       );
							//arr.push(	frm2.advantage[i].value		);
							
							
							args.push( arr );
							
							
		
						}	//if
						
					}	//for
				}
			

				return args;
			}	//fnc_arrMetrix end.........
			
			
			//근태 휴가 변경에 적용
			function fnc_arrMetrix2() {
				

				//1개일경우
				if (frm2.s_chk.length == undefined ) {
					if (frm2.s_chk.checked) {
						//초기화
						args = 	new Array();	//배열생성

						var arr = new Array();
						
						
						//pk
						arr.push(	frm2.yyyymmdd.value		);
						arr.push(	frm2.aemp_no.value		);
						arr.push(	frm2.in_out_tp.value		);
						//pk
						
						arr.push(	frm2.in_out_detail.value	);
						
						if (frm2.etc_mgr.length == 0) {
							frm2.etc_mgr.value = "";
						}
						arr.push(	frm2.etc_mgr.value		);
						
						args.push( arr );
					}
					
				} else {	//다수일 경우
					//초기화
					
					args = 	new Array();	//배열생성
					
					
					for (var i = 0 ; i < frm2.s_chk.length ; i++ ) {
						
						
						
						if ( frm2.s_chk[i].checked ) {
							
							

							var arr	=	new Array();
							
						
							//arr.push(	frm2.s_chk[i].value			);
							
		
							//pk
							arr.push(	frm2.yyyymmdd[i].value		);
							arr.push(	frm2.aemp_no[i].value		);
							arr.push(	frm2.in_out_tp[i].value		);
							//pk
							
							//arr.push(	frm2.in_out_detail[i].value	);
							//arr.push(	frm2.etc_mgr[i].value		);
	                        //arr.push(   frm2.etc_emp[i].value       );
							//arr.push(	frm2.advantage[i].value		);
							
							
							args.push( arr );
							
							
		
						}	//if
						
					}	//for
				}
				

				return args;
			}	//fnc_arrMetrix end.........

		/*******************************************
//		var holidayCheckIn	=	"0006";	//공휴일출근
//		var holidayCheckOut	=	"1008"	//공휴일퇴근
//		var holiday			=	"8003"	//공휴일
			
//		var annual			=	"2001";	//연차휴가
//		var	special			=	"2002"	//특별휴가
//		var happen			=	"2003";	//경조휴가
//		var official 		=	"2004"	//공가휴가
			
		var NN 				=	"NN"	//결근
		var XX		 		=	"XX"	//미입력

		//--------------------------------
		//Add on
		 
//		var	ok_in		=	"0001"	//정상출근
//		var	late_in		=	"0002"	//지각
//		var area_in		=	"0003"	//정상출근(현지)
//		var	even_vaca	=	"0004"	//오전휴가
//		var	even_pub	=	"0005"	//오전공가

//		var	ok_out		=	"1001"	//정상퇴근
//		var	area_out	=	"1002"	//정상퇴근(현지)
//		var	even_out	=	"1003"	//조퇴
//		var	night_work	=	"1004"	//야근
//		var	all_work	=	"1005"	//철야
//		var	after_vaca	=	"1006"	//오후휴가
//		var	after_pub	=	"1007"	//오후공가
				
		*******************************************/
		
		/***************************************************************************************************************/
		//출근유형
		function fnc_dailyInSelect(sel) {

			removeAllOptions(sel);	//All Remove.
			
			<s:iterator value="dailyInList">
				addOption(sel , "<s:property value="cd" />" , "<s:property value="cd_nm" />" );	//Option Append.
			</s:iterator>
		}
		/***************************************************************************************************************/
	
		//퇴근유형
		function fnc_dailyOutSelect(sel) {

			removeAllOptions(sel);	//All Remove.
			
			<s:iterator value="dailyOutList">
				addOption(sel , "<s:property value="cd" />" , "<s:property value="cd_nm" />" );	//Option Append.
			</s:iterator>
		}
		/***************************************************************************************************************/
		//fnc_selected : 본 Script 수정시 Script과 DAO단과  Query단을 수정해야함.
		
		/**
			v : 현재 선택하는 출근 select
			seq : table row index
			flag : change || outloop
		*/
		
		function fnc_selected(v , seq , flag) {
			
			if (flag == "change") {

				var yyyymmdd	=	frm2.yyyymmdd[seq].value;
				var in_out_tp	=	frm2.in_out_tp[seq].value;
				var emp_no		=	frm2.aemp_no[seq].value;

				//본래값과 같을 경우 체크를 해제한다.
				if (v.value == frm2.ori_in_out_detail[seq].value) {
					frm2.s_chk[seq].checked = false;
				} else {
					frm2.s_chk[seq].checked = true;
				}

				//출_퇴근_유형
				for (var i = 0 ; i < frm2.in_out_detail.length ; i++) {
					
					var i_yyyymmdd	=	frm2.yyyymmdd[i].value;		//기준날짜
					var i_in_out_tp	=	frm2.in_out_tp[i].value;	//출퇴근 타입
					var i_emp_no	=	frm2.aemp_no[i].value;		//사번

					if (i != seq) {
						//기준일자 && 사번 비교
						if ( yyyymmdd == i_yyyymmdd && emp_no == i_emp_no ) {
							//frm2.in_out_detail[i].disabled 	= 	false;	//퇴근활성화
							var detail = frm2.in_out_detail[seq].value;

							if (frm2.in_out_tp[i].value == "O") {
								//퇴근 목록 변경
								fnc_optionChange( frm2.in_out_detail[i] , "I" , v.value , frm2.in_out_tp_nm[i].value , i );
							}	//if
						}	//if
					}	//if
				}	//	for

			} else if (flag == "outloop") {

				for ( var i = 0; i < frm2.in_out_detail.length; i++) {
					
					var i_yyyymmdd	=	frm2.yyyymmdd[i].value;		//기준날짜
					var i_in_out_tp	=	frm2.in_out_tp[i].value;	//출퇴근 타입
					var i_emp_no	=	frm2.aemp_no[i].value;		//사번

					if (i != seq) {
						//기준일짜 //사번 비교
						if (yyyymmdd == i_yyyymmdd && emp_no == i_emp_no) {
							frm2.in_out_detail[i].disabled 	= 	false;	//퇴근활성화
							
						}
					}	//if
				}	//for
			}	//else if
		}
		

		//option 전체 제거
		function removeAllOptions(selectbox)
		{
			var i;
			
			for(i = selectbox.options.length-1 ; i>=0 ; i--)
			{
				selectbox.remove(i);
			}
		}

		//Option 추가.
		function addOption(selectbox , value , text , i )
		{
			var optn 	= document.createElement("OPTION");

			optn.text 	= text;
			optn.value 	= value;

			//alert("selectbox   :   " + selectbox.value+"\nvalue  :  "+value +"\ntext  :  " +text+"\n")

			if (value == frm2.ori_in_out_detail[i].value) {
				var attr = document.createAttribute("selected");
				attr.nodeValue = "selected";
				
				optn.setAttributeNode(attr);
			}
			
			selectbox.options.add(optn);
		}


		//select 동적 생성
		function addOptionDyna(selectbox , value , text) {
			
			var optn 	= document.createElement("OPTION");

			optn.text 	= text;
			optn.value 	= value;

			selectbox.options.add(optn);
		}

		//
		function removeOptions(selectbox)
		{
			var i;
			
			for(i = selectbox.options.length - 1 ; i >= 0 ; i--)
			{
				var opt = selectbox.options[i];		//선택된 value

				//alert(opt.value)

				if(selectbox.options[i].selected)
					selectbox.remove(i);
			}
		}

		//퇴근 셀렉트 비활성화시에 메시지 출력
		function fnc_attend_out_msg(th) {
			
			if (th.disabled == true) {
				alert("출근유형 변경시 활성화 됩니다.");
			}
			return false;
		}


		//전체선택 /해제
		function fnc_selectAll(f) {
			if(typeof frm2.s_chk != "undefined" ){
				if(typeof frm2.s_chk.length != "undefined"){
					if ( f.selectALL.checked ) {
						
						alert("출\/퇴근유형 \'미입력\'인 경우는 체크가 되지 않습니다.");
						for ( var i = 0 ; i < frm2.s_chk.length ; i++ ) {
							//미입력일경우 건너뜀
							if (frm2.in_out_detail[i].value == "XX") {
								continue;
							}
							
							if (!frm2.s_chk[i].disabled) {
								frm2.s_chk[i].checked = true;
							}							 
						}						
					} else {						 
						for ( var i = 0 ; i < frm2.s_chk.length ; i++ )  frm2.s_chk[i].checked = false;
					}			
				}else{
					if ( f.selectALL.checked ) {
								frm2.s_chk.checked = true;
					} else {						 
						frm2.s_chk.checked = false;
					}	
				}
			} else {
				if(f.selectALL.checked){
					alert("체크할 데이타가 없습니다.");
				}
			}
		}

		function fnc_mod_io_detail(r) {
			//alert(r)
			if (confirm("수정하시겠습니까?") ) {
				document.getElementById("in_out_detail")[r].disabled = false;
			} else {
				document.getElementById("in_out_detail")[r].disabled = true;
			}
		}

		/**
		출근  / 퇴근 상세 Pop-Up
		*/
		function fnc_in_out_detail(digit) {
			
			//alert(digit); return false;
			
			var yyyymmdd 	= "";		//기준일자		//PK
			var emp_no	 	= 0;		//사번			//PK
			var in_out_tp 	= "";		//출퇴근 유형 		//PK
			
			if (frm2 == undefined) {
				alert("데이터가 없습니다.");
				return false;
			} else if (frm2.s_chk == undefined) {
				alert("데이터가 없습니다.");
				return false;
			} else if (frm2.s_chk.length == undefined) {	//데이터가 1row인 경우

				yyyymmdd	=	frm2.yyyymmdd.value;
				in_out_tp  	= 	frm2.in_out_tp.value;
				emp_no		=	frm2.aemp_no.value;

				//alert(yyyymmdd +"\n"+in_out_tp+"\n"+emp_no);
				
			} else {
				yyyymmdd	=	frm2.yyyymmdd[digit].value;
				in_out_tp  	= 	frm2.in_out_tp[digit].value;
				emp_no		=	frm2.aemp_no[digit].value;

				//alert(yyyymmdd +"\n"+in_out_tp+"\n"+emp_no);

			}

			var w = 350;
			var h = 452;
			
			var x = fnc_center_x(w);
			var y = fnc_center_y(h);

			var url 	= 	"attendManeger_detail_p.action";
			var nm 		= 	"detail";
			var attr 	= 	"width=" + w + " , height=" + h + " , top=" + y + " , left=" + x + " , status=no";   //window size
			
			var param	=	"one_yyyymmdd=" + yyyymmdd + "&";
				param	+= 	"emp_no=" 		+ emp_no + "&";
				param	+=	"in_out_type=" 	+ in_out_tp;

				url		+=	"?" + param;

			window.open(url , nm , attr);

			return false;
		}//fnc_in_out_detail()
		
		//
		function fnc_chioce(th , idx) {

			//본래의 값으로 돌아오면 체크해제함.
			if ((th.value == frm2.ori_in_out_detail[idx].value) ) {
				frm2.s_chk[idx].checked = false;
			} else if (th.value == "XX") {	//미입력
				frm2.s_chk[idx].checked = false;
			} else {
				frm2.s_chk[idx].checked = true;
			}

			var yyyymmdd 		= 	frm2.yyyymmdd[idx].value;
			var emp_no			=	frm2.aemp_no[idx].value;
			var in_out_detail	=	frm2.in_out_detail[idx].value;

			//
			for ( var i = 0; i < frm2.s_chk.length; i++) {

				if (i != idx) {
					var tar		=	frm2.in_out_detail[i];

					if ((yyyymmdd == frm2.yyyymmdd[i].value) && (emp_no == frm2.aemp_no[i].value) && ( frm2.in_out_tp[i].value == "O") ) {
					//alert(yyyymmdd +"\n"+ emp_no +"\n"+ in_out_detail)
						//오전휴가  오후휴가
						if (tar.value == "1006" &&  th.value == "0004") {
					
							alert("오전휴가와 오후휴가는 같이 적용할 수 없습니다.");
	
							th.value = frm2.ori_in_out_detail[idx].value;
							tar.value = frm2.ori_in_out_detail[i].value;
	
							return false;
						//오전공가 오후공가
						} else if (tar.value == "1007" &&  th.value == "0005") {
	
							alert("오전공가와 오후공가는 같이 적용할 수 없습니다.");
	
							th.value 	= frm2.ori_in_out_detail[idx].value;
							tar.value 	= frm2.ori_in_out_detail[i].value;
	
							return false;
						}

						/* --20090508 fix..
						if (th.value != "0006" && th.value != "8003") {
							removeAllOptions(tar);
						}
						*/
						removeAllOptions(tar);
							
						if (th.value == "0001" || th.value == "0002" || th.value == "0003") {
							fnc_disabled(false , i);
							<s:iterator value="list_0001">
								addOption(tar , "<s:property value="cd" />" , "<s:property value="cd_nm" />" , i );	//Option Append.
							</s:iterator>


						} else if (th.value == "0004") {
							fnc_disabled(false , i);
							<s:iterator value="list_0004">
								addOption(tar , "<s:property value="cd" />" , "<s:property value="cd_nm" />" , i );	//Option Append.
							</s:iterator>
							
							
						} else if (th.value == "0005") {
							fnc_disabled(false , i);
							<s:iterator value="list_0005">
								addOption(tar , "<s:property value="cd" />" , "<s:property value="cd_nm" />" , i );	//Option Append.
							</s:iterator>

							
						} else if (th.value == "XX") {//미입력
							<s:iterator value="list_XX">
								addOption(tar , "<s:property value="cd" />" , "<s:property value="cd_nm" />" , i );	//Option Append.
							</s:iterator>
							
							//fnc_disabled(true , i);
							
						} else if (th.value == "NN") {//결근
							fnc_disabled(true , i);
							<s:iterator value="list_NN">
								addOption(tar , "<s:property value="cd" />" , "<s:property value="cd_nm" />" , i );	//Option Append.
							</s:iterator>
							
						} else if (th.value == "2001") {//연차
							fnc_disabled(true , i);
							<s:iterator value="list_2001">
								addOption(tar , "<s:property value="cd" />" , "<s:property value="cd_nm" />" , i );	//Option Append.
							</s:iterator>

							
						} else if (th.value == "2002") {//특별
							fnc_disabled(true , i);
							<s:iterator value="list_2002">
								addOption(tar , "<s:property value="cd" />" , "<s:property value="cd_nm" />" , i );	//Option Append.
							</s:iterator>
								
						} else if (th.value == "2003") {//경조
							fnc_disabled(true , i);
							<s:iterator value="list_2003">
								addOption(tar , "<s:property value="cd" />" , "<s:property value="cd_nm" />" , i );	//Option Append.
							</s:iterator>

							
						} else if (th.value == "2004") {//공가
							fnc_disabled(true , i);

							<s:iterator value="list_2004">
								addOption(tar , "<s:property value="cd" />" , "<s:property value="cd_nm" />" , i );	//Option Append.
							</s:iterator>

						} else if (th.value == "2005") {//기타휴가
							fnc_disabled(true , i);
							<s:iterator value="list_2005">
								addOption(tar , "<s:property value="cd" />" , "<s:property value="cd_nm" />" , i );	//Option Append.
							</s:iterator>
						//평일-공휴일일 경우 --20090508--
						} else if (th.value == "0006" || th.value == "8003" ) {//공휴일출근
							fnc_disabled(false , i);
							addOption(tar , "1008" , "공휴일퇴근" , i );	//Option Append.
							addOption(tar , "8003" , "공휴일퇴근" , i );	//Option Append.
							addOption(tar , "NN"   , "미입력" 	, i );	//Option Append.
						}
						
						break;

					}
				}
			}
			
		}

		//비활성화할지 여부
		function fnc_disabled(bool , i) {
			frm2.s_chk[i].disabled 			= 	bool;		//
			frm2.in_out_detail[i].disabled 	=	bool;		//
			frm2.etc_mgr[i].disabled		=	bool;
		}
		
		//////////////////////////////////////////////
		function setOtion_buseo( obj , idx , arr) {

			//removeAllOptions(obj);

			if (typeof obj == "undefined") {
				alert("데이터가 없습니다.");
				return false;
			}
			
			var objOptionValue = obj.options[obj.options.selectedIndex].value;
			
			if( obj.options.selectedIndex != 0 ){

				var buseo_baleui = document.frm2.in_out_detail[idx];
				
				for(var j = buseo_baleui.length; j > 0 ; j--){
					buseo_baleui.options[j] = null;
				}

				for( var i = 0, z = 0 ; i < arr.length ; i++ ){
					if( objOptionValue == arr[i].alt ) {
						buseo_baleui.options[z] = arr[i];
						z++;
					}	//	if
				}	//	for
			}
		}	//fnc_chioce


	  	//popup 정가운데 띄우기
		function fnc_center_x(w) {

	       	var x;
	       	
			x =  (screen.availWidth - w) / 2;

	       	return x;
		}

	  	//popup 정가운데 띄우기
		function fnc_center_y(h) {

	       	var y;
	       	
			y =  (screen.availHeight - h) / 2;

	       	return y;
		}

		//확인여부에서 N인 경우 데이터가 없을 때
		function fnc_confirm_yn() {
		}

		function fnc_search() {
			var s_date = parseInt( frm.s_date.value.replace("-" , "") , 10 );
			var e_date = parseInt( frm.e_date.value.replace("-" , "") , 10 );
			
			if ( s_date > e_date ) {
				alert("조회기간이 잘못되었습니다. \n\n시작일자을 다시 확인하시기 바랍니다.");
			} else {
				getList('search');
			}
			return false;
			
		}

		//성명조회시 키를 눌렀을 때	//disabled=""
		function fnc_empnmEnable(dis) {
			
			if (event.keyCode == 13) {
				//alert(typeof event.keyCode ); //number
				fnc_search();
				return false;
			}
			
			if (dis.value.length > 0 ) {
				$("#semp_no").attr("disabled" , "disabled");
			} else {
				$("#semp_no").removeAttr('disabled');
			}
		}

		//출/퇴근 유형 분류  선택시 다른 옵션 비활성.
/*		function fnc_in_out_check_type() {
			//alert($("#in_out_tp_condi").val() )
						
			if ($("#in_out_tp_condi").val() == "ALL") {	//전체
				$("#chk_in_type").removeAttr("disabled" , "disabled");
				$("#chk_out_type").removeAttr("disabled" , "disabled");

				$("#in_out_tp_condi").css({backgroundColor:'#ffffff',color:'#656464'});

				$("#chk_in_type").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#chk_in_type").val("ALL");
				$("#chk_out_type").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#chk_out_type").val("ALL");
			} else if ($("#in_out_tp_condi").val() == "I") {	// 출근
				
				$("#in_out_tp_condi").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				$("#chk_out_type").css({backgroundColor:'#ffffff',color:'#656464'});
				//$("#chk_out_type").attr("disabled" , "disabled");

				$("#chk_in_type").removeAttr("disabled" , "disabled");
				$("#chk_in_type").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				
			} else if ($("#in_out_tp_condi").val() == "O") {	//퇴근

				$("#in_out_tp_condi").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				$("#chk_in_type").css({backgroundColor:'#ffffff',color:'#656464'});
				//$("#chk_in_type").attr("disabled" , "disabled");
				
				$("#chk_out_type").removeAttr("disabled" , "disabled");
				$("#chk_out_type").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
			}
		}  */

		//출/퇴근 유형 분류  선택시 다른 옵션 비활성.
		function fnc_in_out_check_type() {
			
			
			if ($("#in_out_tp_condi").val() == "ALL") {	//전체

				$("#chk_in_type").removeAttr("disabled" , "disabled");
				$("#chk_out_type").removeAttr("disabled" , "disabled");

				$("#chk_in_type").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#chk_in_type").val("ALL");
				$("#chk_out_type").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#chk_out_type").val("ALL");

				if($("#chk_in_type").val() != "ALL" || $("#chk_out_type").val() != "ALL" 
					|| $("#absence_type").val() != "ALL" || $("#sp_work_type").val() != "ALL"
					|| $("#sp_work_gubun").val() != "ALL" || $("#addVacation").val() != "ALL" || $("#addVacation_gubun").val() != "ALL"){
					$("#in_out_tp_condi").css({backgroundColor:'#ffffff',color:'#656464'})			

				}else{
					
	           	    $("#vacation_yn").removeAttr("disabled" , "disabled");
	           	    $("#vacation_type").removeAttr("disabled" , "disabled");
	           	    $("#vacation_gubun").removeAttr("disabled" , "disabled");
	           	    $("#vacation_detail").removeAttr("disabled" , "disabled");
	           	    $("#h_vacation_type").removeAttr("disabled" , "disabled");

	           	 	$("#absence_type").removeAttr("disabled" , "disabled");
	
	           	    $("#vacation_yn").css({backgroundColor:'#ffffff',color:'#656464'});
	           	    $("#vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#vacation_gubun").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#vacation_detail").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#h_vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});

					$("#absence_type").css({backgroundColor:'#ffffff',color:'#656464'});

					$("#in_out_tp_condi").css({backgroundColor:'#ffffff',color:'#656464'})	
					$("#chk_in_type").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#chk_out_type").css({backgroundColor:'#ffffff',color:'#656464'});
				}
			} else if ($("#in_out_tp_condi").val() == "I") {	// 출근
				
				$("#in_out_tp_condi").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				$("#chk_out_type").css({backgroundColor:'#ffffff',color:'#656464'});
				//$("#chk_out_type").attr("disabled" , "disabled");

				$("#chk_in_type").removeAttr("disabled" , "disabled");
				$("#chk_in_type").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
           	    $("#vacation_yn").attr("disabled" , "disabled");
           	    $("#vacation_type").attr("disabled" , "disabled");
           	    $("#vacation_gubun").attr("disabled" , "disabled");
           	    $("#vacation_detail").attr("disabled" , "disabled");
           	    $("#h_vacation_type").attr("disabled" , "disabled");
           	 	$("#absence_type").attr("disabled" , "disabled");

           	    $("#vacation_yn").css({backgroundColor:'#999999'});
           	    $("#vacation_type").css({backgroundColor:'#999999'});
				$("#vacation_gubun").css({backgroundColor:'#999999'});	
				$("#vacation_detail").css({backgroundColor:'#999999'});
				$("#h_vacation_type").css({backgroundColor:'#999999'});
				$("#absence_type").css({backgroundColor:'#999999'});
				
			} else if ($("#in_out_tp_condi").val() == "O") {	//퇴근

				$("#in_out_tp_condi").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				$("#chk_in_type").css({backgroundColor:'#ffffff',color:'#656464'});
				//$("#chk_in_type").attr("disabled" , "disabled");
				
				$("#chk_out_type").removeAttr("disabled" , "disabled");
				$("#chk_out_type").css({backgroundColor:'#3366FF',color:'#FFFFFF'});

           	    $("#vacation_yn").attr("disabled" , "disabled");
           	    $("#vacation_type").attr("disabled" , "disabled");
           	    $("#vacation_gubun").attr("disabled" , "disabled");
           	    $("#vacation_detail").attr("disabled" , "disabled");
           	    $("#h_vacation_type").attr("disabled" , "disabled");
           	 	$("#absence_type").attr("disabled" , "disabled");

           	    $("#vacation_yn").css({backgroundColor:'#999999'});
           	    $("#vacation_type").css({backgroundColor:'#999999'});
				$("#vacation_gubun").css({backgroundColor:'#999999'});	
				$("#vacation_detail").css({backgroundColor:'#999999'});
				$("#h_vacation_type").css({backgroundColor:'#999999'});
				$("#absence_type").css({backgroundColor:'#999999'});
			}
			 
		}
        
        function fnc_chk_in_type(){
            
       		if($("#chk_in_type").val() == "ALL"){

				if($("#in_out_tp_condi").val() != "ALL" || $("#chk_out_type").val() != "ALL" 
					|| $("#absence_type").val() != "ALL" || $("#sp_work_type").val() != "ALL"
					|| $("#sp_work_gubun").val() != "ALL" || $("#addVacation").val() != "ALL" || $("#addVacation_gubun").val() != "ALL"){

	       		    $("#chk_in_type").css({backgroundColor:'#ffffff',color:'#656464'});

				}else{
					
	           	    $("#vacation_yn").removeAttr("disabled" , "disabled");
	           	    $("#vacation_type").removeAttr("disabled" , "disabled");
	           	    $("#vacation_gubun").removeAttr("disabled" , "disabled");
	           	    $("#vacation_detail").removeAttr("disabled" , "disabled");
	           	    $("#h_vacation_type").removeAttr("disabled" , "disabled");
	           	 	$("#absence_type").removeAttr("disabled" , "disabled");
	
	           	    $("#vacation_yn").css({backgroundColor:'#ffffff',color:'#656464'});
	           	    $("#vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#vacation_gubun").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#vacation_detail").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#h_vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#absence_type").css({backgroundColor:'#ffffff',color:'#656464'});

					$("#chk_in_type").css({backgroundColor:'#ffffff',color:'#656464'});
				}

           	}else{

           	    $("#chk_in_type").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
         	    $("#vacation_yn").attr("disabled" , "disabled");
           	    $("#vacation_type").attr("disabled" , "disabled");
           	    $("#vacation_gubun").attr("disabled" , "disabled");
           	    $("#vacation_detail").attr("disabled" , "disabled");
           	    $("#h_vacation_type").attr("disabled" , "disabled");
           	 	$("#absence_type").attr("disabled" , "disabled");

           	    $("#vacation_yn").css({backgroundColor:'#999999'});
           	    $("#vacation_type").css({backgroundColor:'#999999'});
				$("#vacation_gubun").css({backgroundColor:'#999999'});	
				$("#vacation_detail").css({backgroundColor:'#999999'});
				$("#h_vacation_type").css({backgroundColor:'#999999'});
				$("#absence_type").css({backgroundColor:'#999999'});

            } 
        }
        function fnc_chk_out_type(){
          
            if($("#chk_out_type").val() == "ALL"){

				if($("#in_out_tp_condi").val() != "ALL" || $("#chk_in_type").val() != "ALL" 
					|| $("#absence_type").val() != "ALL" || $("#sp_work_type").val() != "ALL"
					|| $("#sp_work_gubun").val() != "ALL" || $("#addVacation").val() != "ALL" || $("#addVacation_gubun").val() != "ALL"){

					$("#chk_out_type").css({backgroundColor:'#ffffff',color:'#656464'});

				}else{
					
	           	    $("#vacation_yn").removeAttr("disabled" , "disabled");
	           	    $("#vacation_type").removeAttr("disabled" , "disabled");
	           	    $("#vacation_gubun").removeAttr("disabled" , "disabled");
	           	    $("#vacation_detail").removeAttr("disabled" , "disabled");
	           	    $("#h_vacation_type").removeAttr("disabled" , "disabled");
	           	 	$("#absence_type").removeAttr("disabled" , "disabled");
	
	           	    $("#vacation_yn").css({backgroundColor:'#ffffff',color:'#656464'});
	           	    $("#vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#vacation_gubun").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#vacation_detail").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#h_vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#absence_type").css({backgroundColor:'#ffffff',color:'#656464'});

					$("#chk_out_type").css({backgroundColor:'#ffffff',color:'#656464'});
				}

            }else{
                $("#chk_out_type").css({backgroundColor:'#3366FF',color:'#FFFFFF'});

         	    $("#vacation_yn").attr("disabled" , "disabled");
           	    $("#vacation_type").attr("disabled" , "disabled");
           	    $("#vacation_gubun").attr("disabled" , "disabled");
           	    $("#vacation_detail").attr("disabled" , "disabled");
           	    $("#h_vacation_type").attr("disabled" , "disabled");
           	 	$("#absence_type").attr("disabled" , "disabled");

           	    $("#vacation_yn").css({backgroundColor:'#999999'});
           	    $("#vacation_type").css({backgroundColor:'#999999'});
				$("#vacation_gubun").css({backgroundColor:'#999999'});	
				$("#vacation_detail").css({backgroundColor:'#999999'});
				$("#h_vacation_type").css({backgroundColor:'#999999'});
				$("#absence_type").css({backgroundColor:'#999999'});
            }
         }

      //휴가여부 - 선택시 다른 옵션 비활성.
		function fnc_vacation_yn(obj) {

			var v = obj.value;

			var t = frm.vacation_type;
			
			var tar = frm.vacation_gubun;
			removeAllOptions(tar);	//select box option remove.
			addOptionDyna(tar , "ALL" , "::전체::" );	//Option Append.


			if (v == "ALL") {
				$("#in_out_tp_condi").removeAttr("disabled" , "disabled");
				$("#chk_in_type").removeAttr("disabled" , "disabled");				//출근유형
				$("#chk_out_type").removeAttr("disabled" , "disabled");				//퇴근유형

				$("#addVacation").removeAttr("disabled" , "disabled");
				$("#addVacation_gubun").removeAttr("disabled" , "disabled");
				$("#absence_type").removeAttr("disabled" , "disabled");
				$("#sp_work_type").removeAttr("disabled" , "disabled");
				$("#sp_work_gubun").removeAttr("disabled" , "disabled");

				$("#vacation_type").removeAttr("disabled" , "disabled");
				$("#vacation_gubun").removeAttr("disabled" , "disabled");
				$("#h_vacation_type").removeAttr("disabled" , "disabled");

				$("#in_out_tp_condi").val("ALL" );
				$("#chk_in_type").val("ALL" );
				$("#chk_out_type").val("ALL" );

				$("#addVacation").val("ALL" );
				$("#addVacation_gubun").val("ALL" );
				$("#absence_type").val("ALL" );
				$("#sp_work_type").val("ALL" );
				$("#sp_work_gubun").val("ALL" );

				$("#vacation_yn").val("ALL" );
				$("#vacation_detail").val("ALL" );
				$("#h_vacation_type").val("ALL" );

				$("#in_out_tp_condi").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#chk_in_type").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#chk_out_type").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#absence_type").css({backgroundColor:'#ffffff',color:'#656464'}); 
				
				$("#addVacation").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#addVacation_gubun").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#sp_work_type").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#sp_work_gubun").css({backgroundColor:'#ffffff',color:'#656464'});

				$("#vacation_yn").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#vacation_gubun").css({backgroundColor:'#ffffff',color:'#656464'});	
				$("#vacation_detail").css({backgroundColor:'#ffffff',color:'#656464'});	
				$("#h_vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
				
				removeAllOptions(t);	//select box option remove.
				addOptionDyna(t , "ALL" , "::전체::" );	//Option Append.

			} else if (v == 'VCO') {	//휴가

				//removeAllOptions(t);	//select box option remove.
				//addOptionDyna(t , "ALL" , "::전체::" );	//Option Append.
				//addOptionDyna(t , "HFV" , "반일연차" );	//Option Append.
				//addOptionDyna(t , "2001" , "연차휴가" );	//Option Append.
				//addOptionDyna(t , "2002" , "특별휴가" );	//Option Append.

				removeAllOptions(t);	//select box option remove.
				addOptionDyna(t , "ALL" , "::전체::" );	//Option Append.
				addOptionDyna(t , "VSO" , "연차관련휴가" );	//Option Append.
				addOptionDyna(t , "VSX" , "연차외휴가" );	//Option Append.
			
				$("#vacation_yn").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				$("#vacation_type").css({backgroundColor:'#3366FF',color:'#FFFFFF'});

				$("#in_out_tp_condi").css({backgroundColor:'#999999'});
				$("#chk_in_type").css({backgroundColor:'#999999'});
				$("#chk_out_type").css({backgroundColor:'#999999'});
				$("#absence_type").css({backgroundColor:'#999999'});

				$("#addVacation").css({backgroundColor:'#999999'});
				$("#addVacation_gubun").css({backgroundColor:'#999999'});
				$("#sp_work_type").css({backgroundColor:'#999999'});
				$("#sp_work_gubun").css({backgroundColor:'#999999'});

				$("#vacation_gubun").css({backgroundColor:'#ffffff',color:'#656464'});	
				$("#vacation_detail").css({backgroundColor:'#ffffff',color:'#656464'});	
				$("#h_vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});

				$("#in_out_tp_condi").attr("disabled" , "disabled");			//출퇴근 분류
				$("#chk_in_type").attr("disabled" , "disabled");				//출근유형
				$("#chk_out_type").attr("disabled" , "disabled");				//퇴근유형
				$("#absence_type").attr("disabled" , "disabled");

				$("#addVacation").attr("disabled" , "disabled");
				$("#addVacation_gubun").attr("disabled" , "disabled");
				$("#sp_work_type").attr("disabled" , "disabled");
				$("#sp_work_gubun").attr("disabled" , "disabled");

				$("#vacation_type").removeAttr("disabled" , "disabled");
				$("#vacation_gubun").removeAttr("disabled" , "disabled");
				$("#vacation_detail").removeAttr("disabled" , "disabled");
				$("#h_vacation_type").removeAttr("disabled" , "disabled");

				$("#vacation_type").val("ALL" );
				$("#vacation_gubun").val("ALL" );
				$("#vacation_detail").val("ALL" );
				$("#h_vacation_type").val("ALL" );

			} else if (v == 'VCX') {	//미휴가

				removeAllOptions(t);	//select box option remove.
				//addOptionDyna(t , "ALL" , "::전체::" );	//Option Append.
				//addOptionDyna(t , "HFO" , "반일공가" );	//Option Append.
				//addOptionDyna(t , "2004" , "공가" );	//Option Append.
				//addOptionDyna(t , "2003" , "경조휴가" );	//Option Append.
				//addOptionDyna(t , "2005" , "기타휴가" );	//Option Append.

			
				//$("#vacation_type").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				//$("#vacation_gubun").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				//$("#vacation_detail").css({backgroundColor:'#3366FF',color:'#FFFFFF'});

				//$("#in_out_tp_condi").css({backgroundColor:'#999999'});
				//$("#chk_in_type").css({backgroundColor:'#999999'});
				//$("#chk_out_type").css({backgroundColor:'#999999'});
				//$("#absense_type").css({backgroundColor:'#999999'});
				
				//$("#addVacation").css({backgroundColor:'#999999'});
				//$("#addVacation_gubun").css({backgroundColor:'#999999'});
				//$("#sp_work_type").css({backgroundColor:'#999999'});
				//$("#sp_work_gubun").css({backgroundColor:'#999999'});

				$("#vacation_type").css({backgroundColor:'#999999'});
				$("#vacation_gubun").css({backgroundColor:'#999999'});
				$("#vacation_detail").css({backgroundColor:'#999999'});
				$("#h_vacation_type").css({backgroundColor:'#999999'});

				$("#in_out_tp_condi").attr("abled" , "abled");			//출퇴근 분류
				$("#chk_in_type").attr("abled" , "abled");				//출근유형
				$("#chk_out_type").attr("abled" , "abled");				//퇴근유형
				$("#absense_type").attr("abled" , "abled");
				
				$("#addVacation").attr("abled" , "abled");
				$("#addVacation_gubun").attr("abled" , "abled");
				$("#sp_work_type").attr("abled" , "abled");
				$("#sp_work_gubun").attr("abled" , "abled");

				$("#vacation_type").attr("disabled" , "disabled");
				$("#vacation_gubun").attr("disabled" , "disabled");
				$("#vacation_detail").attr("disabled" , "disabled");
				$("#h_vacation_type").attr("disabled" , "disabled");
			}
			
		}

        
		//휴가유형 - 선택시 다른 옵션 비활성.
		function fnc_vacation_type(obj) {

			var v = obj.value;

			var t = frm.vacation_gubun;
			
			var tar = frm.h_vacation_type;
			removeAllOptions(tar);	//select box option remove.
			addOptionDyna(tar , "ALL" , "::전체::" );	//Option Append.


			if (v == "ALL") {

				//$("#in_out_tp_condi").removeAttr("disabled" , "disabled");
				//$("#chk_in_type").removeAttr("disabled" , "disabled");				//출근유형
				//$("#chk_out_type").removeAttr("disabled" , "disabled");				//퇴근유형

				//$("#addVacation").removeAttr("disabled" , "disabled");
				//$("#addVacation_gubun").removeAttr("disabled" , "disabled");
				//$("#absence_type").removeAttr("disabled" , "disabled");
				//$("#sp_work_type").removeAttr("disabled" , "disabled");
				//$("#sp_work_gubun").removeAttr("disabled" , "disabled");

				//$("#in_out_tp_condi").val("ALL" );
				//$("#chk_in_type").val("ALL" );
				//$("#chk_out_type").val("ALL" );

				//$("#addVacation").val("ALL" );
				//$("#addVacation_gubun").val("ALL" );
				//$("#absence_type").val("ALL" );
				//$("#sp_work_type").val("ALL" );
				//$("#sp_work_gubun").val("ALL" );

				//$("#vacation_type").val("ALL" );
				//$("#vacation_gubun").val("ALL" );
				//$("#h_vacation_type").val("ALL" );
				//$("#vacation_detail").val("ALL" );

				//$("#h_vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
				//$("#vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
				//$("#vacation_gubun").css({backgroundColor:'#ffffff',color:'#656464'});
				//$("#vacation_detail").css({backgroundColor:'#ffffff',color:'#656464'});				

				//$("#in_out_tp_condi").css({backgroundColor:'#ffffff',color:'#656464'});
				//$("#chk_in_type").css({backgroundColor:'#ffffff',color:'#656464'});
				//$("#chk_out_type").css({backgroundColor:'#ffffff',color:'#656464'});
				//$("#absence_type").css({backgroundColor:'#ffffff',color:'#656464'}); 
				
				//$("#addVacation").css({backgroundColor:'#ffffff',color:'#656464'});
				//$("#addVacation_gubun").css({backgroundColor:'#ffffff',color:'#656464'});
				//$("#sp_work_type").css({backgroundColor:'#ffffff',color:'#656464'});
				//$("#sp_work_gubun").css({backgroundColor:'#ffffff',color:'#656464'});

				removeAllOptions(t);	//select box option remove.
				addOptionDyna(t , "ALL" , "::전체::" );	//Option Append.
				$("#vacation_gubun").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#vacation_gubun").val("ALL" );
				$("#vacation_detail").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#vacation_detail").val("ALL" );
				$("#h_vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#h_vacation_type").val("ALL" );

			} else if (v == 'VSO') {	//연차관련휴가

				removeAllOptions(t);	//select box option remove.
				addOptionDyna(t , "ALL" , "::전체::" );	//Option Append.
				//addOptionDyna(t , "HFV" , "반일연차" );	//Option Append.
				addOptionDyna(t , "2001" , "연차휴가" );	//Option Append.
				//addOptionDyna(t , "SPV" , "반일특별" );	//Option Append.
				addOptionDyna(t , "2002" , "특별휴가" );	//Option Append.

				$("#vacation_type").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				$("#vacation_gubun").css({backgroundColor:'#3366FF',color:'#FFFFFF'});

				$("#in_out_tp_condi").css({backgroundColor:'#999999'});
				$("#chk_in_type").css({backgroundColor:'#999999'});
				$("#chk_out_type").css({backgroundColor:'#999999'});
				$("#absence_type").css({backgroundColor:'#999999'});

				$("#addVacation").css({backgroundColor:'#999999'});
				$("#addVacation_gubun").css({backgroundColor:'#999999'});
				$("#sp_work_type").css({backgroundColor:'#999999'});
				$("#sp_work_gubun").css({backgroundColor:'#999999'});

				$("#in_out_tp_condi").attr("disabled" , "disabled");			//출퇴근 분류
				$("#chk_in_type").attr("disabled" , "disabled");				//출근유형
				$("#chk_out_type").attr("disabled" , "disabled");				//퇴근유형
				$("#absence_type").attr("disabled" , "disabled");

				$("#addVacation").attr("disabled" , "disabled");
				$("#addVacation_gubun").attr("disabled" , "disabled");
				$("#sp_work_type").attr("disabled" , "disabled");
				$("#sp_work_gubun").attr("disabled" , "disabled");

				

			} else if (v == 'VSX') {	//연차외 휴가
				
				removeAllOptions(t);	//select box option remove.
				addOptionDyna(t , "ALL" , "::전체::" );	//Option Append.
				//addOptionDyna(t , "HFO" , "반일공가" );	//Option Append.
				addOptionDyna(t , "2004" , "공가" );	//Option Append.
				addOptionDyna(t , "2003" , "경조휴가" );	//Option Append.
				addOptionDyna(t , "2005" , "기타휴가" );	//Option Append.

			
				$("#vacation_type").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				$("#vacation_gubun").css({backgroundColor:'#3366FF',color:'#FFFFFF'});

				$("#in_out_tp_condi").css({backgroundColor:'#999999'});
				$("#chk_in_type").css({backgroundColor:'#999999'});
				$("#chk_out_type").css({backgroundColor:'#999999'});
				$("#absense_type").css({backgroundColor:'#999999'});
				
				$("#addVacation").css({backgroundColor:'#999999'});
				$("#addVacation_gubun").css({backgroundColor:'#999999'});
				$("#sp_work_type").css({backgroundColor:'#999999'});
				$("#sp_work_gubun").css({backgroundColor:'#999999'});

				$("#in_out_tp_condi").attr("disabled" , "disabled");			//출퇴근 분류
				$("#chk_in_type").attr("disabled" , "disabled");				//출근유형
				$("#chk_out_type").attr("disabled" , "disabled");				//퇴근유형
				$("#absense_type").attr("disabled" , "disabled");
				
				$("#addVacation").attr("disabled" , "disabled");
				$("#addVacation_gubun").attr("disabled" , "disabled");
				$("#sp_work_type").attr("disabled" , "disabled");
				$("#sp_work_gubun").attr("disabled" , "disabled");

				$("#vacation_gubun").val("ALL" );
				$("#vacation_detail").val("ALL" );
				$("#h_vacation_type").val("ALL" );
			}
			
		}

		//휴가부여구분 -  선택시 다른 옵션 비활성.
		/*function fnc_vacation_gubun(obj) {

			var v = obj.value;

			var t = frm.h_vacation_type;

			if(v == "HFV")	{	//반일연차

				removeAllOptions(t);	//select box option remove.
				addOptionDyna(t , "ALL" , "::전체::" );	//Option Append.
				addOptionDyna(t , "0004" , "오전휴가" );	//Option Append.
				addOptionDyna(t , "1006" , "오후휴가" );	//Option Append.
				$("#h_vacation_type").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				
				
			} else if(v == "HFO")	{	//반일연차

				removeAllOptions(t);	//select box option remove.
				addOptionDyna(t , "ALL" , "::전체::" );	//Option Append.
				addOptionDyna(t , "0005" , "오전공가" );	//Option Append.
				addOptionDyna(t , "1007" , "오후공가" );	//Option Append.
				$("#h_vacation_type").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				
			} else 	{
                
				removeAllOptions(t);	//select box option remove.
				addOptionDyna(t , "ALL" , "::전체::" );	//Option Append.
				$("#h_vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
			}
		}*/

		//휴가분류
		function fnc_vacation_gubun(obj) {

			var v = obj.value;

			var t = frm.vacation_detail;

			if(v == "2001")	{	//연차휴가

				removeAllOptions(t);	//select box option remove.
				addOptionDyna(t , "ALL" , "::전체::" );	//Option Append.
				addOptionDyna(t , "HDD" , "연차일일휴가" );	//Option Append.
				addOptionDyna(t , "HHD" , "연차반일휴가" );	//Option Append.
				$("#vacation_detail").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				
				
			} 
			else if(v == "2002")	{	//특별휴가

				removeAllOptions(t);	//select box option remove.
				addOptionDyna(t , "ALL" , "::전체::" );	//Option Append.
				addOptionDyna(t , "SDD" , "특별일일휴가" );	//Option Append.
				addOptionDyna(t , "SHD" , "특별반일휴가" );	//Option Append.
				$("#vacation_detail").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				
			} 
			else if(v == "2004")	{	//공가

				removeAllOptions(t);	//select box option remove.
				addOptionDyna(t , "ALL" , "::전체::" );	//Option Append.
				addOptionDyna(t , "GDD" , "일일공가" );	//Option Append.
				addOptionDyna(t , "GHD" , "반일공가" );	//Option Append.
				$("#vacation_detail").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				
			} 
			else if(v == "2003")	{	//경조휴가

				removeAllOptions(t);	//select box option remove.
				addOptionDyna(t , "ALL" , "::전체::" );	//Option Append.
				addOptionDyna(t , "FDD" , "경조일일휴가" );	//Option Append.
				addOptionDyna(t , "FHD" , "경조반일휴가" );	//Option Append.
				$("#vacation_detail").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				
			} 
			else if(v == "2005")	{	//기타휴가

				removeAllOptions(t);	//select box option remove.
				addOptionDyna(t , "ALL" , "::전체::" );	//Option Append.
				addOptionDyna(t , "EDD" , "기타일일휴가" );	//Option Append.
				addOptionDyna(t , "EHD" , "기타반일휴가" );	//Option Append.
				$("#vacation_detail").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				
			} 
			else 	{
                
				removeAllOptions(t);	//select box option remove.
				addOptionDyna(t , "ALL" , "::전체::" );	//Option Append.
				$("#vacation_detail").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#vacation_detail").val("ALL" );

				$("#h_vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#h_vacation_type").val("ALL" );
			}
		}

		//휴가상세구분 -  선택시 다른 옵션 비활성.
		function fnc_vacation_detail(obj) {

			var v = obj.value;

			var t = frm.h_vacation_type;

			if(v == "HHD" || v == "SHD" || v == "GHD" || v == "FHD" || v == "EHD" )	{	//반일연차

				removeAllOptions(t);	//select box option remove.
				addOptionDyna(t , "ALL" , "::전체::" );	//Option Append.
				addOptionDyna(t , "0004" , "오전휴가" );	//Option Append.
				addOptionDyna(t , "1006" , "오후휴가" );	//Option Append.
				$("#h_vacation_type").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				
				
			}// else if(v == "HFO")	{	//반일연차

			//	removeAllOptions(t);	//select box option remove.
			//	addOptionDyna(t , "ALL" , "::전체::" );	//Option Append.
			//	addOptionDyna(t , "0005" , "오전공가" );	//Option Append.
			//	addOptionDyna(t , "1007" , "오후공가" );	//Option Append.
			//	$("#h_vacation_type").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				
			//} 
			else 	{
                
				removeAllOptions(t);	//select box option remove.
				addOptionDyna(t , "ALL" , "::전체::" );	//Option Append.
				$("#h_vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
			}
		}

		//특근조회  선택시 다른 옵션 비활성.
		function fnc_sp_work_type(obj) {  //특근조회에서 함수 호출

			var v = obj.value;

			var t = frm.sp_work_gubun;  // 특근 분류
			var tt = frm.addVacation; //휴가부여 여부

			if (v == "ALL") {

				if($("#in_out_tp_condi").val() != "ALL" || $("#chk_in_type").val() != "ALL" 
					|| $("#absence_type").val() != "ALL" || $("#chk_out_type").val() != "ALL"
					|| $("#sp_work_gubun").val() != "ALL" || $("#addVacation").val() != "ALL" || $("#addVacation_gubun").val() != "ALL"){

					removeAllOptions(t);	//select box option remove.
					addOptionDyna(t , "ALL" , "::전체::" );	//Option Append.
					$("#sp_work_type").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#sp_work_gubun").css({backgroundColor:'#ffffff',color:'#656464'});

				}else{
					
	           	    $("#vacation_yn").removeAttr("disabled" , "disabled");
	           	    $("#vacation_type").removeAttr("disabled" , "disabled");
	           	    $("#vacation_gubun").removeAttr("disabled" , "disabled");
	           	    $("#vacation_detail").removeAttr("disabled" , "disabled");
	           	    $("#h_vacation_type").removeAttr("disabled" , "disabled");
	           	 	$("#absence_type").removeAttr("disabled" , "disabled");
	
	           	    $("#vacation_yn").css({backgroundColor:'#ffffff',color:'#656464'});
	           	    $("#vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#vacation_gubun").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#vacation_detail").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#h_vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#absence_type").css({backgroundColor:'#ffffff',color:'#656464'});

					$("#sp_work_type").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#sp_work_gubun").css({backgroundColor:'#ffffff',color:'#656464'});
				}
			}

			if (v == "ALL" && tt.value == "ALL") {

				//$("#in_out_tp_condi").removeAttr("disabled" , "disabled");			//출퇴근 분류
				//$("#chk_in_type").removeAttr("disabled" , "disabled");				//출근유형
				//$("#chk_out_type").removeAttr("disabled" , "disabled");				//퇴근유형
				//$("#absence_type").removeAttr("disabled" , "disabled");				//
				
				//$("#addVacation_gubun").css({backgroundColor:'#ffffff'}); 
                $("#sp_work_gubun").css({backgroundColor:'#ffffff',color:'#656464'});
                //$("#addVacation").css({backgroundColor:'#ffffff'});
				$("#h_vacation_type").removeAttr("disabled" , "disabled");              //반차분류
				$("#vacation_type").removeAttr("disabled" , "disabled");                //휴가유형
				$("#vacation_gubun").removeAttr("disabled" , "disabled");               //휴가분류
				$("#vacation_yn").removeAttr("disabled" , "disabled");                //휴가유형
				$("#vacation_detail").removeAttr("disabled" , "disabled");               //휴가분류
				$("#absence_type").removeAttr("disabled" , "disabled"); 

				$("#sp_work_type").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#h_vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});		
				$("#vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#vacation_gubun").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#vacation_yn").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#vacation_detail").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#absence_type").css({backgroundColor:'#ffffff',color:'#656464'});
				
				removeAllOptions(t);	//select box option remove.
				addOptionDyna(t , "ALL" , "::전체::" );	//Option Append.

			} else if (v == "SWO") {		//연차관련휴가    특근조회에서 특근 선택
				
				$("#sp_work_type").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				removeAllOptions(t);	//select box option remove.
				addOptionDyna(t , "ALL" 	, "::전체::" );				//Option Append.
				addOptionDyna(t , "1005" 	, "철야" );					//Option Append.
				addOptionDyna(t , "0006" 	, "공휴일 근무" );			//Option Append.
     if($("#sp_work_gubun").val() == "ALL"){
				    	 $("#sp_work_gubun").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				    	 //$("#addVacation").css({backgroundColor:'#FFFF00'});
			    }

				$("#h_vacation_type").css({backgroundColor:'#999999'});
				$("#vacation_type").css({backgroundColor:'#999999'});
				$("#vacation_gubun").css({backgroundColor:'#999999'});
				$("#vacation_yn").css({backgroundColor:'#999999'});
				$("#vacation_detail").css({backgroundColor:'#999999'});
				$("#absence_type").css({backgroundColor:'#999999'});

				//$("#in_out_tp_condi").attr("disabled" , "disabled");			//출퇴근 분류
				//$("#chk_in_type").attr("disabled" , "disabled");				//출근유형
				//$("#chk_out_type").attr("disabled" , "disabled");				//퇴근유형
				//$("#absence_type").attr("disabled" , "disabled");				//
				
				$("#h_vacation_type").attr("disabled" , "disabled");
				$("#vacation_type").attr("disabled" , "disabled");
				$("#vacation_gubun").attr("disabled" , "disabled");
				$("#vacation_yn").attr("disabled" , "disabled");
				$("#vacation_detail").attr("disabled" , "disabled");
				$("#absence_type").attr("disabled" , "disabled");
			 
			} else if (v == "SWX") {		//연차외휴가  //미특근

				$("#sp_work_type").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				//$("#addVacation").css({backgroundColor:'#FFFF00'});
				removeAllOptions(t);	//select box option remove.
				addOptionDyna(t , "ALL" 	, "::전체::" );				//Option Append.

				$("#sp_work_gubun").css({backgroundColor:'#ffffff',color:'#656464'});

				$("#h_vacation_type").css({backgroundColor:'#999999'});		
				$("#vacation_type").css({backgroundColor:'#999999'});
				$("#vacation_gubun").css({backgroundColor:'#999999'});
				$("#vacation_yn").css({backgroundColor:'#999999'});
				$("#vacation_detail").css({backgroundColor:'#999999'});
				$("#absence_type").css({backgroundColor:'#999999'});
				
				$("#h_vacation_type").attr("disabled" , "disabled");
				$("#vacation_type").attr("disabled" , "disabled");
				$("#vacation_gubun").attr("disabled" , "disabled");
				$("#vacation_yn").attr("disabled" , "disabled");
				$("#vacation_detail").attr("disabled" , "disabled");
				$("#absence_type").attr("disabled" , "disabled");
			}
		}

		//휴가반영  선택시 다른 옵션 비활성.
		function fnc_addVavation (obj) {

			var v = obj.value;

			var t = frm.addVacation_gubun;
			var tt = frm.sp_work_type;

			//if ( (v == "ALL" && tt.value == "ALL") || (v=="ALL" && tt.value=="SWO") || (tt.value=="SWX" && v=="ALL") ) {
			if ( v == "ALL" ) {


				if($("#in_out_tp_condi").val() != "ALL" || $("#chk_in_type").val() != "ALL" 
					|| $("#absence_type").val() != "ALL" || $("#chk_out_type").val() != "ALL"
					|| $("#sp_work_gubun").val() != "ALL" || $("#sp_work_type").val() != "ALL" || $("#addVacation_gubun").val() != "ALL"){

					
					removeAllOptions(t);	//select box option remove.
					addOptionDyna(t , "ALL" 	, "::전체::" );				//Option Append.

					$("#addVacation").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#addVacation_gubun").css({backgroundColor:'#ffffff',color:'#656464'});
					//$("#sp_work_type").css({backgroundColor:'#3366FF',color:'#FFFFFF'});

	           	    $("#vacation_yn").removeAttr("disabled" , "disabled");
	           	    $("#vacation_type").removeAttr("disabled" , "disabled");
	           	    $("#vacation_gubun").removeAttr("disabled" , "disabled");
	           	    $("#vacation_detail").removeAttr("disabled" , "disabled");
	           	    $("#h_vacation_type").removeAttr("disabled" , "disabled");
	           	 	$("#absence_type").removeAttr("disabled" , "disabled");

	           	    $("#vacation_yn").css({backgroundColor:'#ffffff',color:'#656464'});
	           	    $("#vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#vacation_gubun").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#vacation_detail").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#h_vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#absence_type").css({backgroundColor:'#ffffff',color:'#656464'});
						

				}

				else if($("#sp_work_type").val()=="SWO"){
				$("#sp_work_gubun").css({backgroundColor:'#3366FF',color:'#FFFFFF'});

				$("#addVacation").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#addVacation_gubun").css({backgroundColor:'#ffffff',color:'#656464'});
				//$("#sp_work_type").css({backgroundColor:'#3366FF',color:'#FFFFFF'});

           	    $("#vacation_yn").removeAttr("disabled" , "disabled");
           	    $("#vacation_type").removeAttr("disabled" , "disabled");
           	    $("#vacation_gubun").removeAttr("disabled" , "disabled");
           	    $("#vacation_detail").removeAttr("disabled" , "disabled");
           	    $("#h_vacation_type").removeAttr("disabled" , "disabled");
           	 	$("#absence_type").removeAttr("disabled" , "disabled");

           	    $("#vacation_yn").css({backgroundColor:'#ffffff',color:'#656464'});
           	    $("#vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#vacation_gubun").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#vacation_detail").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#h_vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#absence_type").css({backgroundColor:'#ffffff',color:'#656464'});

                }
				else if($("#sp_work_type").val()=="ALL"){
					$("#sp_work_type").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#sp_work_gubun").css({backgroundColor:'#ffffff',color:'#656464'});

					$("#addVacation").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#addVacation_gubun").css({backgroundColor:'#ffffff',color:'#656464'});
					//$("#sp_work_type").css({backgroundColor:'#3366FF',color:'#FFFFFF'});

	           	    $("#vacation_yn").removeAttr("disabled" , "disabled");
	           	    $("#vacation_type").removeAttr("disabled" , "disabled");
	           	    $("#vacation_gubun").removeAttr("disabled" , "disabled");
	           	    $("#vacation_detail").removeAttr("disabled" , "disabled");
	           	    $("#h_vacation_type").removeAttr("disabled" , "disabled");
	           	 	$("#absence_type").removeAttr("disabled" , "disabled");
	
	           	    $("#vacation_yn").css({backgroundColor:'#ffffff',color:'#656464'});
	           	    $("#vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#vacation_gubun").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#vacation_detail").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#h_vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#absence_type").css({backgroundColor:'#ffffff',color:'#656464'});
				}

				else{
					
	           	    $("#vacation_yn").removeAttr("disabled" , "disabled");
	           	    $("#vacation_type").removeAttr("disabled" , "disabled");
	           	    $("#vacation_gubun").removeAttr("disabled" , "disabled");
	           	    $("#vacation_detail").removeAttr("disabled" , "disabled");
	           	    $("#h_vacation_type").removeAttr("disabled" , "disabled");
	           	 	$("#absence_type").removeAttr("disabled" , "disabled");
	
	           	    $("#vacation_yn").css({backgroundColor:'#ffffff',color:'#656464'});
	           	    $("#vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#vacation_gubun").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#vacation_detail").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#h_vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#absence_type").css({backgroundColor:'#ffffff',color:'#656464'});

					$("#addVacation").css({backgroundColor:'#ffffff',color:'#656464'});
					$("#addVacation_gubun").css({backgroundColor:'#ffffff',color:'#656464'});
					//$("#sp_work_type").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				}

			} else if (v == "AVO")	{	//휴가부여

				removeAllOptions(t);	//select box option remove.
				addOptionDyna(t , "ALL" 		, "::전체::" );				//Option Append.
				addOptionDyna(t , "3302" 		, "반일휴가" );				//Option Append.
				addOptionDyna(t , "3303" 		, "일일휴가" );				//Option Append.

				  // if (v == "ALL"){
					//  $("#addVacation_gubun").css({backgroundColor:'#ffffff'});
					//  $("#addVacation_gubun").val("ALL");

				//	}
				
				//$("#sp_work_type").css({backgroundColor:'#FFFF00'});

				$("#addVacation_gubun").css({backgroundColor:'#3366FF',color:'#FFFFFF'}); 
				$("#addVacation").css({backgroundColor:'#3366FF',color:'#FFFFFF'});             			

                
				
				$("#h_vacation_type").css({backgroundColor:'#999999'});		
				$("#vacation_type").css({backgroundColor:'#999999'});
				$("#vacation_gubun").css({backgroundColor:'#999999'});
				$("#vacation_yn").css({backgroundColor:'#999999'});
				$("#vacation_detail").css({backgroundColor:'#999999'});
				$("#absence_type").css({backgroundColor:'#999999'});

				$("#h_vacation_type").attr("disabled" , "disabled");
				$("#vacation_type").attr("disabled" , "disabled");
				$("#vacation_gubun").attr("disabled" , "disabled"); 
				$("#vacation_yn").attr("disabled" , "disabled");
				$("#vacation_detail").attr("disabled" , "disabled");
				$("#absence_type").attr("disabled" , "disabled");  
				
			} else if (v == "AVX")	{	//휴가미부여
				
				removeAllOptions(t);	//select box option remove.
				addOptionDyna(t , "ALL" 	, "::전체::" );				//Option Append.
				$("#addVacation").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				$("#addVacation_gubun").css({backgroundColor:'#ffffff',color:'#656464'});
				
				$("#h_vacation_type").css({backgroundColor:'#999999'});		
				$("#vacation_type").css({backgroundColor:'#999999'});
				$("#vacation_gubun").css({backgroundColor:'#999999'});
				$("#vacation_yn").css({backgroundColor:'#999999'});
				$("#vacation_detail").css({backgroundColor:'#999999'});
				$("#absence_type").css({backgroundColor:'#999999'});
				
				$("#h_vacation_type").attr("disabled" , "disabled");
				$("#vacation_type").attr("disabled" , "disabled");
				$("#vacation_gubun").attr("disabled" , "disabled");
				$("#vacation_yn").attr("disabled" , "disabled");
				$("#vacation_detail").attr("disabled" , "disabled");
				$("#absence_type").attr("disabled" , "disabled");
				
			}
			
		}

		//결근 선택시 다른 옵션 비활성.
		function fnc_disabled_absence() {
			if ($('#absence_type').val() == "ALL") {

				$("#absence_type").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#in_out_tp_condi").removeAttr("disabled" 	, "disabled");			//출퇴근 분류
				$("#chk_in_type").removeAttr("disabled" 		, "disabled");				//출근유형
				$("#chk_out_type").removeAttr("disabled" 		, "disabled");				//퇴근유형
				
				$("#h_vacation_type").removeAttr("disabled" 	, "disabled");	
				$("#vacation_type").removeAttr("disabled" 		, "disabled");	
				$("#vacation_yn").removeAttr("disabled" 		, "disabled");	
				$("#vacation_detail").removeAttr("disabled" 		, "disabled");		
				$("#sp_work_gubun").removeAttr("disabled" 		, "disabled");		
				$("#vacation_gubun").removeAttr("disabled" 		, "disabled");		
				$("#sp_work_type").removeAttr("disabled" 		, "disabled");			
				$("#addVacation").removeAttr("disabled" 		, "disabled");			
				$("#addVacation_gubun").removeAttr("disabled" 	, "disabled");

				$("#in_out_tp_condi").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#chk_in_type").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#chk_out_type").css({backgroundColor:'#ffffff',color:'#656464'});

				$("#h_vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});		
				$("#vacation_type").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#vacation_gubun").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#vacation_yn").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#vacation_detail").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#sp_work_type").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#sp_work_gubun").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#vacation_gubun").css({backgroundColor:'#ffffff',color:'#656464'});
				$("#addVacation").css({backgroundColor:'#ffffff',color:'#656464'});		
				$("#addVacation_gubun").css({backgroundColor:'#ffffff',color:'#656464'});		
				
			} else {
				
				$("#absence_type").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
				$("#in_out_tp_condi").css({backgroundColor:'#999999'});
				$("#chk_in_type").css({backgroundColor:'#999999'});
				$("#chk_out_type").css({backgroundColor:'#999999'});

				$("#h_vacation_type").css({backgroundColor:'#999999'});		
				$("#vacation_type").css({backgroundColor:'#999999'});
				$("#vacation_gubun").css({backgroundColor:'#999999'});
				$("#vacation_yn").css({backgroundColor:'#999999'});
				$("#vacation_detail").css({backgroundColor:'#999999'});
				$("#sp_work_type").css({backgroundColor:'#999999'});
				$("#sp_work_gubun").css({backgroundColor:'#999999'});
				$("#vacation_gubun").css({backgroundColor:'#999999'});
				$("#addVacation").css({backgroundColor:'#999999'});		
				$("#addVacation_gubun").css({backgroundColor:'#999999'});			
				
				$("#chk_in_type").val("ALL");
				$("#chk_out_type").val("ALL");
				$("#in_out_tp_condi").val("ALL");
			

				$("#in_out_tp_condi").attr("disabled" 	, "disabled");			//출퇴근 분류
				$("#chk_in_type").attr("disabled" 		, "disabled");				//출근유형
				$("#chk_out_type").attr("disabled" 		, "disabled");				//퇴근유형
				
				$("#h_vacation_type").attr("disabled" 	, "disabled");			
				$("#vacation_type").attr("disabled" 	, "disabled");				
				$("#vacation_gubun").attr("disabled" 	, "disabled");	
				$("#vacation_yn").attr("disabled" 	, "disabled");				
				$("#vacation_detail").attr("disabled" 	, "disabled");				
				$("#sp_work_type").attr("disabled" 		, "disabled");				
				$("#sp_work_gubun").attr("disabled" 	, "disabled");				
				$("#vacation_gubun").attr("disabled" 	, "disabled");				
				$("#addVacation").attr("disabled" 		, "disabled");				
				$("#addVacation_gubun").attr("disabled" , "disabled");			
			}
		}
        function mgrChange(){
        	if($("#mgr_change_yn").val()=="ALL"){
    			$("#mgr_change_yn").css({backgroundColor:'#ffffff',color:'#656464'});

             }else{
            	$("#mgr_change_yn").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
             }
        }

        function confirmYn(){
        	if($("#confirm_yn").val()=="ALL"){
    			$("#confirm_yn").css({backgroundColor:'#ffffff',color:'#656464'});

             }else{
            	$("#confirm_yn").css({backgroundColor:'#3366FF',color:'#FFFFFF'});
             }

        }
		/****
		20091007
		*/
		function fnc_disabled() {
	    	if (document.frm.searchEmpNm.value.length > 0) {
	    		$("#semp_no").attr("disabled" , "disabled");
	    	}
		}

		/*20091008
		검색조건 변경에 관련된 공지사항.
		*/
		$(document).ready(function() { 
/*
			if (getCookie('ATTEND_NOTICS') != 'done') {
				$.blockUI({ message: $('#question'), css: { width: '570px' , height: '270px' } });
			} 

			$('#no').click(function() { 
	            $.unblockUI(); 
	            return false; 
	        });

	        $('#hide').click(function() {
	        	setCookie('ATTEND_NOTICS' , 'done' , 1);	//하루동안 안보기.
	        	$.unblockUI(); 
	            return false;
			});
 */
		});
		function fnc_adva1(th){
          alert(th.value);
		}
		//출근입력 창을 띄운다.
		function fnc_check_in() {

			var chk = document.frm2.s_chk;

			if (chk == undefined) {
				alert("데이터가 없습니다.");
				return false;
			}
/*
			if ( typeof chk.length == "undefined" ) {
				//alert("휴가입력시에만 체크된 사항이 반영됩니다.");
			} else {
				for ( var i = 0 ; i < chk.length ; i++) {
					
					if (chk[i].checked) {
						if (chk[i].value == document.getElementById("frm_yyyymmdd").value || chk[i].disabled) {
							continue;
						} else if (chk[i].checked) {
							
							alert("출근은 현재일만 등록됩니다.\n선택은 휴가입력에서만 사용됩니다.");
							return false;
						}
						break;
					}
				}
			}
			*/
			var msg = document.frm2.chk_in_msg.value;
			if (msg.length != 0) {
				alert(msg);
				return false;
			}
			
			var form = document.frm2;
			
			var x = fnc_center_x(350);
			var y = fnc_center_y(280);

			var url     =   "attend_open_p.action";                  //popup page
	        var nm      =   "check_in_p";                    		//popup window name
	        var attr    =   "width=350 , height=280 , top=" + y + " , left=" + x + " , status=no";   //window size
	        
	        //window.open(url , nm , attr);   //팝업창 열기
	        
	        window.open("" , nm , attr);   //팝업창 열기
	        
	        form.target = nm;
	        form.action = url;
	        form.submit();
	        
	        return false;
		}
		

		//퇴근입력 창을 띄운다.
		function fnc_check_out() {

			var chk = document.frm2.s_chk;

			if ( typeof chk.length == undefined ) {
				//alert("휴가입력시에만 체크된 사항이 반영됩니다.");
			} /*else {
				for ( var i = 0 ; i < chk.length ; i++) {
					
					if (chk[i].checked) {
						if (chk[i].value == document.getElementById("frm_yyyymmdd").value || chk[i].disabled) {
							continue;
						} else if (chk[i].checked) {
							alert("퇴근은 현재일만 등록됩니다.\n선택은 휴가입력에서만 사용됩니다.");
							return false;
						}
						break;
					}
				}
			}
*/
			var msg = document.frm2.chk_out_msg.value;
			
			if (msg.length != 0) {
				alert(msg);
				return false;
			}
			
			var form = document.frm2;
			
			var msg = document.frm2.chk_in_msg.value;
			
			if (msg.length == 0) {
				alert("<s:text name="alert.message.checkInFirst" />");
				return false;
			}

			var x = fnc_center_x(350);
			var y = fnc_center_y(280);

			var url     =   "attend_close_p.action";            	//popup page
	        var nm      =   "check_in_p";                    		//popup window name
	        var attr    =   "width=350 , height=280 , top=" + y + " , left=" + x + " , status=no";   //window size
	        
	        //window.open(url , nm , attr);   //팝업창 열기
	        
	        window.open("" , nm , attr);   //팝업창 열기
	        
	        form.target = nm;
	        form.action = url;
	        form.submit();
	        
	        return false;
		}
		//휴가입력창을 띄운다.
		function fnc_vacation_in(field) {
		    
			
			if (!fnc_check(field)) {
				return false;
			}
			
			var args = fnc_arrMetrix2();//날자와 tp datail
			//alert(args);
            var str = String(args);                //넘어온 배열을 문자열로 형 변환
            var str2;
			var regExp = /\d{8}\W\D\W/gi;          //문자열 정규식  
			var regExp2 = /\W\d{4}\b/gi;
			var regExp3 =/\W\D\W\d{4}\b/gi;        //기준일자만 추출
			var myCode = str.replace(regExp,"");   
			var arr = new Array();
			var count=0;
			var tr=0;
			var tr2=0;
            var strSub = str.substring(11,15);     //함수에서 넘어온 문자열의 11번째부터 15번째 까지( 휴가 코드값)
            var arrStr;
            var ymd;
            var ymdArr = new Array(); 
            
                 arr.push(myCode);                 //배열에 휴가 코드값을 담는다.
                 str2 = String(arr);               //두번째로 배열을 형변환
                 arr = str2.split(",");            //split 함수로 배열에 담는다(배열은 초기화)
                 arrStr = String(arr);             //다시 형변환
                 ymd = str.replace(regExp3,"");
                 ymdArr = ymd.split(",");
                 
             if(strSub=="2001"||strSub=="2002"||strSub=="2003"||strSub=="2004"||strSub=="2005"){  //첫번째 체크한 값의 휴가 코드값일 경우                         
                 // alert(myCode);                                                                
                  
			      for(var i=0; i<arr.length; i++){                          //체크한 값의 길이를 센다.
				     count++;
				     //alert("count1111111c"+count);
				     //alert("arr======"+arr);
			      }
			      
	              if(count%2==0){                                           //체크한것이 짝수일때
		            // alert("%2========="+arrStr);
                    
		              for(var i=0; i<arrStr.length; i=i+5){               
                          if(arrStr.charAt(i)=="1" || arrStr.charAt(i)=="0"){  //처음 코드 값이 1이거나 0인 것은 반일휴가 코드임
                            tr++;
                          }
                          
			          } 
			              if(tr%2==1){
				             alert("일일휴가와 반일휴가는 동시에 변경할 수 없습니다.");
				               return false;
			          }
			          for(var i=0; i<ymdArr.length; i=i+2){
	                        // alert("ymdArr===============2==="+ymdArr)
			              
	                      if(ymdArr[i]==ymdArr[i+1]){
	                                 tr2++; 
	                      }
	                      
	                   }
			              if(tr2<=0){
	                         alert("일일휴가는 출퇴근행을 동시에 체크하여 변경하시기 바랍니다.");
	                           return false;
					  }
	              }
	                
       
	             if(count%2==1){
		             
 		             //alert("왜-------"+str);
 		        	alert("일일휴가는 동일기준일자의 출퇴근행을 전부 선택하여야만 변경이 가능합니다.일일휴가를 오전및 오후휴가로 변경코자 할경우 확인자에게 요청하십시요.");
                    return false;
                 }
             }


             if(strSub=="0004"||strSub=="0005"||strSub=="0007"||strSub=="0008"||strSub=="0009"||strSub=="1006"||strSub=="1007"||
            		 strSub=="1009"||strSub=="1010"||strSub=="1011"){     //처음 체크한 값이 반일 휴가 코드값들일때
        		 
                 for(var i=0; i<arr.length; i++){
                    count++;
                 }
                 if(count%2==0){                                           //체크한것이 짝수일때
 		            // alert("%2========="+arrStr);
                     
 		              for(var i=0; i<arrStr.length; i=i+5){               
                           if(arrStr.charAt(i)=="2"){  //처음 코드 값이 1이거나 0인 것은 반일휴가 코드임
                             tr++;
                           }
                           
 			          } 
 			              if(tr%2==1){
 				             alert("일일휴가와 반일휴가는 동시에 변경할 수 없습니다.");
 				               return false;
 			          }
 			  
 	              }
	              if(count%2==1){
                     for(var i=0; i<arrStr.length; i=i+5){
                        if(arrStr.charAt(i)=="2"){
                           tr++;
                        }
                     }
                     if(tr>0){
                        alert("일일휴가와 반일휴가는 동시에 변경할 수 없습니다.");
                          return false;
                     }
		          }
             }

			 var sendStr = str.replace(regExp2,"");
            //alert("strfff-----"+str);
			//alert("iff-----"+sendStr);	
            
            document.getElementById("vaca_yyyymmdd").value = sendStr;

			var x = fnc_center_x(350);
			var y = fnc_center_y(205);
			
			var url		=	"attend_vacation_p.action";
			var nm      =   "check_in_p";                    		//popup window name
			var attr    =   "width=350 , height=205 , top=" + y + " , left=" + x + " , status=no";   //window size

			//window.showModalDialog(url , args , "dialogWidth:350px; dialogHeight:205px; help:0");
			window.open("" , nm , attr );
			
			frm2.target = nm;
	        frm2.action = url;
	        frm2.submit();

			return false;
		}
		//체크한 값을 넘기기 위한 전역변수
		
			
      var args;
		
		function fnc_check(field) {
			
			args = new Array();	//배열생성
			
			if (!field) {
				alert("<s:text name="alert.message.notCheck"/>");
				return false;
			}

			//체크박스가 하나일 경우 처리하는 로직
			if (!field.length) {
				if (!field.checked) {
					alert("<s:text name="alert.message.requiedCheck"/>");
					field.focus();
					return false;
				} else {
					args.push(field.value);
					return true;
				}
			}

			
			
			var checkflag = false;	//check init
			
			//체크된것이 없을시에 알람 메시지 출력
			//alert(field.length);	//checkbox 갯수
			for(i = 0 ; i < field.length ; i++) {
				if (!field[i].checked) {
					continue;
				} else {
					checkflag = true;
					//alert(field[i].value)
					args.push(field[i].value);	//배열에 값을 넣는다.
				}
			}
			
			//체크되지 않았으면 메시지 출력
			if (!checkflag) {
				alert("<s:text name="alert.message.selectData"/>");
				return false;
			}

			return true;
		} 

		//ajajx_list-checkbox-
		function fnc_selct_items() {
			var frm = document.form;
			var chk = document.getElementById("s_chk");
			//alert(chk);
			
			
		}
/*		function window::onload(){
			alert(1);
			var chk = document.frm2.s_chk;
			alert(2);
			var oriDetail = document.frm2.ori_in_out_detail;
			alert(3);
            alert(chk.length);
			for(var i=0; i<chk.length ; i++){
                chk[i].disabled = true;
                if(oriDetail[i].value=="0004"||oriDetail[i].value=="0005"||oriDetail[i].value=="0007"||oriDetail[i].value=="0008"||oriDetail[i].value=="0009"||
                   oriDetail[i].value=="1006"||oriDetail[i].value=="1007"||oriDetail[i].value=="1009"||oriDetail[i].value=="1010"||oriDetail[i].value=="1011"||
                   oriDetail[i].value=="2001"||oriDetail[i].value=="2002"||oriDetail[i].value=="2003"||oriDetail[i].value=="2004"||oriDetail[i].value=="2005"){
                    chk[i].disabled = false;  
               }
		    }   
	    }*/
<!--        -->
		/***************************************C O O K I E****************************************************/
		//쿠키-하루동안 안보기
		function setCookie(name, value, expiredays)
		{
		    // 만료일 (expiredays가 365면 만료일은 현재날짜로부터 365일)
		    var exdate = new Date();
		    exdate.setDate(exdate.getDate()+expiredays);

		    document.cookie = name+"="+value+((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
		}

		function getCookie( name )
		{
		    var nameOfCookie = name + "=";
		    var x = 0;
		    while ( x <= document.cookie.length )
		    {
		        var y = (x+nameOfCookie.length);
		        if ( document.cookie.substring( x, y ) == nameOfCookie ) {
		            if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
		                endOfCookie = document.cookie.length;
		            return unescape( document.cookie.substring( y, endOfCookie ) );
		        }
		        x = document.cookie.indexOf( " ", x ) + 1;
		        if ( x == 0 )
		            break;
		    }
		    return "";
		}
		/***************************************C O O K I E****************************************************/


	</script>
<!-- ============================== J A V A S C R I P T 	E	N	D ============================== -->
</head>
<!-- ============================== HEAD END ============================== -->

<!-- ============================== BODY START ============================== -->
<body onload="doOnLoad()">

<!-- 공지사항 -->
<div class="fl_ri">
<div id="contants_box">
<div id="tit"><span class="fl_ri tit_navi">Home &gt; <span
	class="f_b">근태관리</span><img src="/images/btl_navi.gif" class="img_tp" /></span>
<div class="fl_le"><img src="/images/tit_menu01_img01.gif" /></div>
</div>

<s:form name="frm" id="frm" theme="simple">

	<s:hidden name="emp_no" id="emp_no" value="%{semp_no}" />
	<s:hidden name="emp_nm" id="emp_nm" value="%{semp_nm}" />
	<s:hidden name="group_no" id="group_no" />
	<s:hidden name="group_nm" id="group_nm" />
	<s:hidden name="team_no" id="team_no" value="%{steam}" />

	<s:hidden id="cur_page" name="cur_page" />
	<!-- -------------------------------------	C O N D I T I O N 	S T A R T------------------------------------- -->
				<div id="search024">
				<div id="search_box024">
					<ul>
						<li class="txt">기간</li>
						<li class="input01">
	                              <input type="text" size="12" maxlength="10" name="s_date" id="s_date" value="<s:property value="s_date" />" class="input_100se" style="height:20;background-image:url('images/calendar/calendar.gif');background-repeat:no-repeat;background-position:right 2px;cursor:hand" />
	                               ~
	                              <input type="text" size="12" maxlength="10" name="e_date" id="e_date" value="<s:property value="e_date" />" class="input_100se" style="height:20;background-image:url('images/calendar/calendar.gif');background-repeat:no-repeat;background-position:right 2px;cursor:hand" />						
						</li>
					</ul>
					
					<ul>
		                <li class="txt">그룹</li>
		                <li class="input"><s:select name="xGroupNm" cssClass="combobox130se" list="xGroupNm" listKey="xGroupNm"listValue="xGroupNm" /> 
		                   <input type="hidden" name="sgroup"id="sgroup" value="<s:property value="sgroup"/>" />
		                </li>
		                <li class="txt04">팀</li>
		                <li class="input"><s:select name="xTeamNm" cssClass="combobox75se" list="xTeamNm" listKey="xTeamNm" listValue="xTeamNm" /> <input type="hidden" name="steam" id="steam" value="<s:property value="steam"/>" /></li>
		                <li class="txt01">성명</li>
		                <li class="input">
		                    <s:select name="xEmpNm" cssClass="combobox75se" list="xEmpNm" listKey="xEmpNm" listValue="xEmpNm" /> <input type="hidden" name="semp_no" id="semp_no" value="<s:property value="semp_no"/>" /></li>
	                </ul>
					<ul>
						<li class="txt">출/퇴근<br>분류</li>
						<li class="input">
							<s:select id="in_out_tp_condi" name="in_out_tp_condi" list="#{'I':'출근' , 'O':'퇴근'}" cssClass="combobox75se" headerKey="ALL" headerValue="::전체::" onchange="fnc_in_out_check_type()" />
						</li>
						<li class="txt01">출근유형</li> 
						<li class="input">
							<s:select id="chk_in_type" 		name="chk_in_type" 		list="listCheckInType" cssClass="combobox75se" headerKey="ALL" headerValue="::전체::" listKey="cd" listValue="cd_nm" onchange="fnc_chk_in_type()"/>
						</li>
						<li class="txt01">퇴근유형</li>
						<li class="input">
							<s:select id="chk_out_type" 	name="chk_out_type" 	list="listCheckOutType" cssClass="combobox75se" headerKey="ALL" headerValue="::전체::" listKey="cd" listValue="cd_nm" onchange="fnc_chk_out_type()"/>
						</li>						
						<li class="txt01">결근유형</li>
						<li class="input">
							<s:select id="absence_type" 	name="absence_type" 	value="%{absence_type}" 	list="#{'NN':'결근'}" cssClass="combobox75se" headerKey="ALL" headerValue="::전체::" onchange="fnc_disabled_absence()"/>
						</li>
						<li class="txt01">확인여부</li>
						<li class="input">
							<s:select id="confirm_yn" 		name="confirm_yn" 		list="#{'Y':'Y' , 'N':'N'}" cssClass="combobox75se" headerKey="ALL" headerValue="::전체::" onchange="confirmYn()"/>
						</li>						
					</ul>
					<ul>
						<li class="txt">특근조회</li>
						<li class="input">
							<s:select id="sp_work_type" name="sp_work_type" value="" list="#{'SWO':'특근' , 'SWX':'미특근'}" cssClass="combobox75se" headerKey="ALL" headerValue="::전체::" onchange="fnc_sp_work_type(this)"/>
						</li>
						<li class="txt01">특근분류</li>
						<li class="input">
							<s:select id="sp_work_gubun" name="sp_work_gubun" value="" list="#{}" cssClass="combobox75se" headerKey="ALL" headerValue="::전체::" onchange=""/>
						</li>
						
						<li class="txt01">휴가부여<br>여부</li>
						<li class="input">
							<s:select id="addVacation" name="addVacation" list="#{'AVO':'휴가부여' , 'AVX':'휴가미부여'}" cssClass="combobox75se" headerKey="ALL" headerValue="::전체::" onchange="fnc_addVavation(this)"/>
						</li>
						<li class="txt01">휴가부여<br>분류</li>
						<li class="input">
							<s:select id="addVacation_gubun" name="addVacation_gubun" list="#{}" cssClass="combobox75se" headerKey="ALL" headerValue="::전체::" onchange="fnc_addVavation_gubun(this)"/>
						</li>
						<li class="txt01">유형상세<br>변경여부</li>
						<li class="input">
							<s:select id="mgr_change_yn" name="mgr_change_yn" value="%{detail_yn}" list="#{'Y':'Y' , 'N':'N'}" cssClass="combobox75se" headerKey="ALL" headerValue="::전체::" onchange="mgrChange()" />
						</li>
					</ul>
					<!--div class="input_bar"></div-->
					<ul>					
						<li class="txt">휴가여부</li>
						<li class="input">
							<s:select id="vacation_yn" 	name="vacation_yn" 	list="#{'VCO':'휴가' , 'VCX':'미휴가'}" cssClass="combobox75se" headerKey="ALL" headerValue="::전체::" onchange="fnc_vacation_yn(this)" />
						</li>	
						<li class="txt01">휴가유형</li>
						<li class="input">
							<s:select id="vacation_type" 	name="vacation_type" 	list="#{'VSO':'연차관련휴가' , 'VSX':'연차외휴가'}" cssClass="combobox75se" headerKey="ALL" headerValue="::전체::" onchange="fnc_vacation_type(this)" />
						</li>
						<li class="txt01">휴가분류</li>
						<li class="input">
							<s:select id="vacation_gubun" 	name="vacation_gubun" 	list="#{}" cssClass="combobox75se" headerKey="ALL" headerValue="::전체::" onchange="fnc_vacation_gubun(this)" />
						</li>
						<li class="txt01">휴가상세</li>
						<li class="input">
							<s:select id="vacation_detail" 	name="vacation_detail" 	list="#{}" cssClass="combobox75se" headerKey="ALL" headerValue="::전체::" onchange="fnc_vacation_detail(this)" />
						</li>
						<li class="txt01">반차분류</li>
						<li class="input">
							<s:select id="h_vacation_type" 	name="h_vacation_type" 	list="#{}" cssClass="combobox75se" headerKey="ALL" headerValue="::전체::" listKey="cd" listValue="cd_nm" onchange="" />
						</li>			
					</ul>					
	<ul class="btn">

		<span class="fl_ri"> <img src="/images/btn_search.gif" class="img_tm" style="vertical-align: middle; cursor: pointer;"
			onclick="return fnc_search()" />&nbsp; <s:submit type="image"
			onclick="return fnc_check_in()" src="/images/btn_attend_in.gif"
			title="출근등록" value="출근등록" /> <s:submit type="image"
			onclick="return fnc_check_out()" src="/images/btn_leaving_in.gif"
			title="퇴근등록" value="퇴근등록" /> <s:submit type="image"
			onclick="return fnc_vacation_in(frm2.s_chk)"
			src="/images/btn_holidays_reply.gif" cssClass="img_tm" title="휴가변경"
			value="휴가변경" /> <img src="/images/btn_excel.gif" class="img_tm"
			title="EXCEL 다운로드" style="vertical-align: middle; cursor: pointer;"
			onclick="return fnc_excel()" /> <!--<img src="/images/search_dot_line.gif" />-->
		</span>

	</ul>
	</div>
	</div>
	<!-- -------------------------------------	C O N D I T I O N 	E	N	D------------------------------------- -->
	<!-- -------------------------------------	B U T T O N 	S T A R T------------------------------------- -->



	<!----------Search_Box : ENd ---------->
	<!----------Tbl_info & Table box ------>
	<!-- -------------------------------------	B U T T O N 	E	N	D------------------------------------- -->
</s:form> <s:form name="frm2" id="frm2" theme="simple">
	<s:hidden id="updateArgs" name="updateArgs" />
	<s:hidden name="ajaxFlag" />
	<!-- 확인버튼 클릭시 전체 리플러쉬 없앰 -->
	<s:hidden name="emp_no" id="emp_no" value="%{semp_no}" />
	<s:hidden name="vaca_yyyymmdd" id="vaca_yyyymmdd" />
	<!-- s_chk 체크된 값을 담음. 1/13-->
	<s:hidden name="vaca_in_out_tp" id="vaca_in_out_tp" />
	<!-- ajax로 데이터를 조회해 온다. -->
	<center><s:url id="ajax_list" action="attend_detail_list_ajax" />
	<s:div id="itemAmtlistDiv" theme="ajax" executeScripts="true"
		showLoadingText="true"
		loadingText='<img src="./images/loading_request.gif" />'
		href="%{ajax_list}" listenTopics="ajax_list" formId="frm" /></center>
</s:form> <!-- ajax dummy --> <s:url id="temp_list"
	action="attend_manager_update" /> <s:div id="tempDiv" theme="ajax"
	executeScripts="true" showLoadingText="false" href="%{temp_list}"
	listenTopics="ajaxDojo" formId="frm2" />
	
	<s:url id="temp_list"
	action="attend_manager_update1" /> <s:div id="tempDiv" theme="ajax"
	executeScripts="true" showLoadingText="false" href="%{temp_list}"
	listenTopics="ajaxDojo1" formId="frm2" /></div>
	</div>
</div>

</body>
<!-- ============================== BODY END ============================== -->

</html>